﻿Public Class IssueListViewItem
    Inherits Windows.Forms.ListViewItem
    Sub New(ByVal issue As RemoteIssue)
        _Issue = issue
        For n = 0 To 10
            Me.SubItems.Add("")
        Next
        Refresh()
    End Sub
    Private _Issue As RemoteIssue
    Property Issue As RemoteIssue
        Get
            Return _Issue
        End Get
        Set(ByVal value As RemoteIssue)
            _Issue = value
        End Set
    End Property

    Private Sub Refresh()
        Dim values() As Object
        With Issue
            values = {.type, .key, .summary, .assignee, .reporter, .priority, .status, .resolution, .created, .updated, .duedate}
        End With
        For i = 0 To values.GetUpperBound(0)
            Me.SubItems(i).Text = values(i)
        Next
    End Sub

End Class
